''License:
''libtgfx - Threaded Graphics library for FreeBASIC
''Copyright (C) 2013  Ebben Feagan <sir@mud.owlbox.net>
''
''This library is free software; you can redistribute it and/or
''modify it under the terms of the GNU Lesser General Public
''License as published by the Free Software Foundation; either
''version 2.1 of the License, or (at your option) any later version.
''
''This library is distributed in the hope that it will be useful,
''but WITHOUT ANY WARRANTY; without even the implied warranty of
''MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
''Lesser General Public License for more details.
''
''You should have received a copy of the GNU Lesser General Public
''License along with this library; if not, write to the Free Software
''Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

#undef window

    ''Namespace: tgfx.window
    namespace tgfx.window

        ''Enum: Window Flags
        ''Convenience values to pass to <init>
        enum
            NULL_WINDOW                    = -1        , _
            FULLSCREEN_WINDOW              = &h01      , _
            NO_SWITCH                      = &h04      , _
            NO_FRAME                       = &h08      , _
            SHAPED_WINDOW                  = &h10      , _
            ALWAYS_ON_TOP                  = &h20      , _
            ALPHA_PRIMITIVES               = &h40      , _
            HIGH_PRIORITY                  = &h80
        end enum

        ''Function: init
        ''Attempts to intialize the graphics system.
        ''
        ''Parameters:
        ''x - the width of the requested screen
        ''y - the height of the requested screen
        ''bpp - <GFXmode> requested.
        ''flags - any options to pass on to the graphics system
        ''
        ''Returns:
        ''<bool> representing success (true) or failure (false)
        declare function init(  byval x as integer, _
                                byval y as integer, _
                                byval bpp as GFXmode = _32bit, _
                                byval flags as integer = 0 _
                            ) as bool

        ''Sub: setTitle
        ''Sets the window title of the open window.
        ''
        ''Parameters:
        ''rhs - the text to set the title to
        declare sub setTitle( byref rhs as const string )

        ''Sub: lock
        ''Acquire a lock on the graphics system to allow direct memory access.
        declare sub lock()

        ''Sub: unlock
        ''Release a previously aquired lock on the graphics system.
        declare sub unlock()

        ''Function: screendata
        ''Aquire a pointer to the direct screen memory.
        ''
        ''Returns:
        ''any ptr to screen region of memory, do not free
        declare function screendata( ) as any ptr

        ''Sub: clear
        ''Clear the screen.
        declare sub clear()
    end namespace
